#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int missingNumber(int* nums, int numsSize) {

	int n = numsSize;
	int ret = n * (n + 1) / 2;
	for (int i = 0; i < numsSize; i++)
	{
		ret -= nums[i];
	}
	return ret;

}
int main() {
	int arr[3] = { 3,0,1 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	printf("%d", missingNumber(arr, sz));
	return 0;
}
